-
Notifications
You must be signed in to change notification settings - Fork 0
TA-4530: Implement secure secret storage #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| **Best Practices:** | ||
| - Ensure your system keychain is properly configured and accessible | ||
| - If you see warnings about plaintext storage, consider re-creating the profile to enable secure storage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you mentioned a migration solution being intentionally skipped in the PR description, but I think it would be very straightforward to enable users on it without re-create. Something like content-cli profile secure <profile> and re-use logic the already implemented logic from this PR.
|



Description
Implemented secure secret storage using keytar lib with fallback to the current plain text storage for cases where storing the secrets in the system keychain fails or is not available (eg. on linux due to libsecret dependency).
A warning will be shown to users when creating or using a profile with insecure secret storage.
Solutions for migrating existing profile secrets automatically or providing a helper command will be considered separately.
Relevant links
Checklist
Note
Introduces secure storage for profile secrets with automatic use of the system keychain and plaintext fallback when unavailable.
SecureSecretStorageServiceusingkeytarto save/retrieveapiToken,clientSecret, andrefreshTokenundercelonis-content-cli:<profile-name>Profilemodel updated (ProfileSecrets,secretsStoredSecurelyflag);storeProfilenow async, strips secrets when saved securely;findProfileloads secrets from keychain when flaggedProfileCommandService/ProfileServiceupdated to awaitstoreProfileand persist refreshed tokens securelypackage.jsonaddskeytar; extensive unit tests added for secure storage, fallback, and keytar-unavailable scenarios; lockfile updatedWritten by Cursor Bugbot for commit 9c60ea8. This will update automatically on new commits. Configure here.